package com.xpalive.commons;

import java.util.function.Supplier;
import lombok.Getter;

public final class Constants {

    private Constants() {
        BizAssert.privateConstructor();
    }

    public enum RespCode {

        B10001("jwt 过期"),
        S200("正确"),
        E400("参数错误"),
        E503("载过重未能应答"),
        E500("服务器错误");

        @Getter
        private String codeMessage;

        RespCode(String codeMessage) {
            this.codeMessage = codeMessage;
        }
    }

    public enum DateFormatter implements Supplier<String> {
        DATE_TIME {
            @Override
            public String get() {
                return "yyyy-MM-dd HH:mm:ss";
            }
        }, DATE {
            @Override
            public String get() {
                return "yyyy-MM-dd";
            }
        };
    }

}
